BOOT.EXE Version 2.01 Copyright 1988 by Stephen C. Kick *************** DISCLAIMER ************** The author, Stephen C. Kick, makes no warranties expressed or implied as to the quality or performance of this program. The author will not be held liable for any direct, indirect, incidental, or consequential damages resulting from the use of this program. Your use of the program constitutes your agreement to this disclaimer and your release of the author from any form of liability or litigation. ****************************************** BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick PURPOSE OF BOOT.EXE The purpose of this program is to ease the process of booting the computer in different configurations. By boot up configuration, I am refering to way the "CONFIG.SYS" and "AUTOEXEC.BAT" files initialize your computer after a reset has occured. Most people can use the same " CONFIG.SYS" and "AUTOEXEC.BAT" files all of the time. However, for those of us who use several different terminate-and-stay-resident programs (TSRs), different DOS interfaces, and large programs requiring lots of memory the ability to change the boot up configuration of the computer is a must. "BOOT.EXE" has been designed for those people who require the ability to change the boot up configuration and even those who only need this ability occasionally. "BOOT.EXE" enables up to a maximum of 255 different boot up configurations to be used, by allowing data for "CONFIG.SYS" and "AUTOEXEC.BAT" files to be placed in a single text file. Since the data is in a text file, it can be easily edited and managed using your favorite text editor. An additional advantage of this program is that you will always have clean copies of your different "AUTOEXEC.BAT" and "CONFIG.SYS" files available. "BOOT.EXE" is not memory resident, requires about 80K to run and is a DESQview (C) aware program. DESQview is a trademark of Quarterdeck Office Systems. "BOOT.EXE" is a shareware program, it is NOT PUBLIC DOMAIN. The cost, if you decide to use it, is only $10. This is my first venture into selling any of the software I have developed, so I thought I would start out small and see the response. Shareware is a great way to obtain and evaluate affordable, quality software before you fork out the bucks for it. An example for building the "AUTOEXEC.BAT" and "CONFIG.SYS" files is located in a file named "BOOT.CFG". BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick HOW BOOT.EXE WORKS "BOOT.EXE" works by parsing a text file for your "AUTOEXEC.BAT" and "CONFIG.SYS" data. This text file must be named "BOOT.CFG" and must be located in the root directory of the boot up disk. "BOOT.EXE" can be located in any subdirectory you desire on the boot up disk. When "BOOT.EXE" is executed it looks in the root directory for the file named "BOOT.CFG". If a parameter has not been entered on the command line then "BOOT.EXE" parses the text file to build and display a menu. Parsing is accomplished by searching the text file "BOOT.CFG" for four parsing keys, all of which begin with a squiggly parenthesis and a dollar sign "{$". The four phrases are "{$Default=", "{$Name=", "{$C}", and "{$A}". The "{$Default=" phrase will only appear once in the configuration file, and then only in column one of the first line. The remaining three phrases are used with each boot up configuration which you define. It is very important to heed the following note: ****************** NOTE: ******************* IF ANY OF THESE THREE PHRASES, "{$NAME=", "{$C}", "{$A}", ARE MISSING UNPREDICTABLE RESULTS WILL OCCUR. EACH CONFIGURATION MUST USE ALL THREE PHRASES IN THE CORRECT SEQUENCE FOR "BOOT.EXE" TO PROPERLY PARSE AND WRITE YOUR "CONFIG.SYS" AND "AUTOEXEC.BAT" FILES. USE THE "CHECK" OPTION AT THE COMMAND LINE TO VERIFY "BOOT.CFG" HAS BEEN SET UP CORRECTLY. ****************** NOTE: ******************* "BOOT.EXE" searches for "{$Name=" first. Once that key phrase is detected, the line is parsed for the name of that particular configuration and checked to see if it matches the one being sought after. If it is not a match then the program continues searcheing until a match is found, or the end of the file is reached. After locating the name of desired configuration, the program searches for the "CONFIG.SYS" file data which is indicated by the "{$C}". This means you can have an extended description on the lines between "{$Name=" and "{$C}" if you want. This area could contain the development date, revision status, and a more elaborate description of that particular configuration, or clever phrases such as "KILROY WAS HERE" for example. The point being that everything between the lines containing "{$Name=" and "{$C}" can contain anything you want. Nothing will be written to the "CONFIG.SYS" file until the "{$C}" is detected. After "BOOT.EXE" detects the "{$C}", it regards everything from the line after the "{$C}" , to the line proceeding the "{$A}" as data for the "CONFIG.SYS" file. The "AUTOEXEC.BAT" file data is then considered to be everything on the line following the "{$A}" to the line preceding the next "{$Name=", or until the end of the file is encountered. PLEASE NOTE THAT WHEN DEVELOPING YOUR "BOOT.CFG" FILE, DO NOT INCLUDE THE QUOTES, THEY ARE ONLY BEING USED FOR HIGHLIGHTING PURPOSES. BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick RULES FOR BUILDING BOOT.CFG 1. The name of a configuration is prefixed by "{$Name=" and may be followed by a description. The parsing key "{$Name=" must start in column one. The name can be twelve (12) characters long, up to column 20. Anything starting at column twenty (20) is regarded as part of the description. The description can be up to 60 characters long, any more than this is ignored. For maximum menu readability limit names to ten (10) characters. The name of a configuration can be anything you want EXCEPT "CHECK". The name "CHECK" is reserved for debugging purposes (see USING BOOT.EXE, note #7). 2. A default menu choice may be used by adding the parsing key "{$Default=" followed by the name of the configuration you want to be the default menu choice. The parsing key "{$Default" must be the **FIRST** line in "BOOT.CFG". The default is used to determine which menu choice is to be highlighted when the menu is first displayed. If the default name is not found or no default is specified then the default menu choice will be the first configuration found in "BOOT.CFG". 3. After the first line in the configuration file and before the first "{$Name=", any number of lines may be used to keep notes or descriptions. If fact you may even include this file in that area. Just be sure that none of the lines have "{$Default=", "{$Name=", "{$C}", or "{$A}" starting in column 1 since the program uses these to key on. You may also include information after each "{$Name=" and its corresponding "{$C}". NOTE: Before you include your life history as part of "BOOT.CFG" it is important to point out the program must read those lines to get to the actual configurations, thus resulting in a decrease in performance. Therefore, keep the information in these areas short. 4. The information for the "CONFIG.SYS" files are indicated by "{$C}" starting at column one and is followed starting on the next line by the "CONFIG.SYS" data. 5. The information for the "AUTOEXEC.BAT" file is indicated by "{$A}" starting at column one and is followed starting on the next line by the "AUTOEXEC.BAT" data. 6. The parsing keys "{$Name=", "{$C}" and "{$A}" work as a set. Each "{$Name" must have a "{$C}" following it and each "{$C}" must have a "{$A}" following it. BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick RULES FOR BUILDING BOOT.CFG (continued) 7. The general layout of the "BOOT.CFG" file is as follows : {$Default= 2 (Must be on FIRST LINE IN BOOT.CFG) Any notes or messages for your self here. {$Name=BootConfig1 Description {$C} CONFIG.SYS data {$A} AUTOEXEC.BAT data {$Name=BootConfig2 Description {$C} CONFIG.SYS data {$A} AUTOEXEC.BAT data 8. The program is not case sensitive. 9. Up to a maximum of 255 configurations can be used. 10. Strings in the "BOOT.CFG" file are limited to 255 characters. However the lines using the parsing key "{$Name=" should be limited to less than 80 characters, anything past column 80 will be ignored for these lines. BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick USING BOOT.EXE 1. The BOOT program looks for "BOOT.CFG" in the root directory of the default drive. Therefore if you use multiple drives you may want to use the following batch file : C: CD\ BOOT.EXE 2. The "AUTOEXEC.BAT" and "CONFIG.SYS" files are written to the root directory of the default drive. 3. The name or number of the desired configuration may be entered on the DOS command line. In this case the menu will not be displayed unless the choice is invalid. The command line is not case sensitive. Examples : BOOT 4 BOOT Plain 4. If no choice is entered on the command line a menu is displayed showing the the configuration number, name and a description of each routine. To select the desired boot configuration simply move to the desired configuration using the up and down arrow keys and press enter or enter the number on the desired configuration. The PAGE UP, PAGE DOWN, HOME and END keys may also be used to move around in the menu. When the digit of a number is pressed an entry line will appear on the bottom of the menu prompting for the number. After typing in the desired number press enter. The ESCAPE key may used to exit the menu without making a choice. 5. When the menu is displayed the number of desired configuration may also be entered. If you press a number and want to go back to the menu simply press ESCAPE. 6. The file "BOOT.CFG" must be located in the root directory. 7. A debugging option has been added for debugging your "BOOT.CFG" file. When the command : BOOT CHECK is entered at the DOS command line, "BOOT.EXE" will scan the "BOOT.CFG" file and check to see that all the parsing keys are in the correct order and that none are missing. If an error is found, then the line number, the line containing the error, and an error message will be displayed when the program terminates. When the "CHECK" option is used no "CONFIG.SYS" or "AUTOEXEC.BAT" files will be written or modified. The "CHECK" command line option should be used whenever changes have been made to "BOOT.CFG" to ensure proper operation of the program. BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick USING BOOT.EXE (continued) 8. "BOOT.EXE" will return the following error codes which can be used by the DOS "ERRORLEVEL" command in batch files : 0 : No Errors, Program ended normally, CONFIG.SYS and AUTOEXEC.BAT files have been updated. 1 : User pressed escape to exit, nothing was written to disk 2 : Unsupported video mode, nothing was written to disk 3 : Missing in parsing key or parsing key out of order. Some data may have been written to disk. Be sure and check the contents of the "CONFIG.SYS" and "AUTOEXEC.BAT" files before rebooting. 4 : Memory error, nothing was written to disk 5 : Error with "BOOT.CFG" file. Data may have been written to disk. Be sure and check the contents of the "CONFIG.SYS" and "AUOTEXEC.BAT" files before rebooting. 9. When adding a boot up configuration to "BOOT.CFG" or performing a major modification to a configuration make sure that you get the "CONFIG.SYS" and "AUTOEXEC.BAT" files you are expecting BEFORE YOU REBOOT. This can be accomplished very easily by using the TYPE command at the DOS prompt and viewing the contents of the "CONFIG.SYS" and "AUTOEXEC.BAT" files. For example the command : TYPE CONFIG.SYS entered at the DOS prompt will display the contents of the "CONFIG.SYS" file. The command : TYPE AUTOEXEC.BAT will display the contents of the "AUTOEXEC.BAT" file. You may also use your favorite text editor to view them. If you don't see what you expect to see then re-edit the "BOOT.CFG" file. BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick TRYING OUT BOOT.EXE To to try out this program you may perform the following steps: 1. Copy "BOOT.EXE" and "BOOT.CFG" to the root directory of drive A. 2. Set drive A as your default drive. 3. Type "BOOT" at the DOS prompt. 4. Select a boot up configuration from the menu and press ENTER. The program will then write an "CONFIG.SYS" and "AUTOEXEC.BAT" file to the root directory on drive A. 5. At the DOS prompt type "TYPE CONFIG.SYS" to view the contents of the "CONFIG.SYS" file. 6. At the DOS prompt type "TYPE AUTOEXEC.BAT" to view the contents of the "AUTOEXEC.BAT" file. BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick HISTORY OF BOOT.EXE BOOT.EXE was conceived when I was attempting to automate the selection of different AUTOEXEC.BAT and CONFIG.SYS files in order to boot up my computer in different configurations. I manage about ten different computers , all with different software and hardware configurations, therefore, I needed a system which was easy to maintain and adaptable. I initially tried to implement the system using numerous batch files, however I could never remember exactly which one did what and had numerous files to edit and keep track of. Next I tried to combine everything into a single elaborate batch file. This was easier to use but cumbersome to manage. I finally decided to use a program to parse the different "AUTOEXEC.BAT" and "CONFIG.SYS" files out of a single text file. Version 1 of "BOOT.EXE" used the first 25 lines in the text file to display the menu. Actually, it wasn't really a menu, if nothing was entered on the command line then the first 25 lines of the text file were displayed as a menu. Version 1 was very compact, taking up less than 3K of executable code and less than 20K of memory to run. Version 1 worked great, except that it was a chore to modify. Every time a boot up configuration was added, or deleted, the menu had to be changed manually. Version 2 entirely automates the building of a real menu. Implementation of the menu system required almost an entire rewrite of the system and resulted in a much larger program. The result, however is an extremely easy method of managing multiple boot up configurations for your computer. Version 2.01 added some finishing touches to Version 2.00. The 2.00 version used a number as an entry for the default menu choice. Version 2.01 allows a name to be specified instead. This is much easier than trying to count down to the configuration which you want to use for the default. Additional error checking has also been added to Version 2.01 via the "CHECK" option which can be entered at the command line. The "CHECK" option will scan the "BOOT.CFG" file for errors. BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick BOOT.EXE Registration BOOT.EXE can be registered for only $10. Please fill out the information below and return with your Check, Money order, or Cash (sorry no credit cards) to : Stephen C. Kick 703 Alder Drive Allen, Texas 75002 I can also be contacted on : BIX : SKICK or CompuServe : 73707,2340 if you have any further questions. BOOT.EXE Version 2.01 Copyright 1988 by Stephen Kick BOOT.EXE Registration Form Mail this registration form to : Stephen C. Kick 703 Alder Drive Allen, Texas 75002 Name : _____________________________________ Company : __________________________________ Address : ___________________________________ City : __________________________ State : _________ Zip Code : __________ Phone Number : ________________ Number of copies of "BOOT.EXE" _____________ X $10 = ___________ Total How and where did you obtain program : ______________________________________ ______________________________________________________________________________ Type of Computer : ___________________________________ Primary use of Computer : _______________________________________ Peripherals Used : __________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ Comments : __________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________